Skip to content

release: 0.51.0#97

Open
stainless-app[bot] wants to merge 21 commits intomainfrom
release-please--branches--main--changes--next
Open

release: 0.51.0#97
stainless-app[bot] wants to merge 21 commits intomainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app
Copy link
Copy Markdown
Contributor

@stainless-app stainless-app Bot commented Apr 23, 2026

Automated Release PR

0.51.0 (2026-04-24)

Full Changelog: v0.50.0...v0.51.0

Features

  • add browser-scoped session client (ef994b4)
  • Expose browser_session_id on managed auth connection (e23defc)
  • generate browser-scoped service bindings (b6a77bc)

Bug Fixes

  • align browser-scoped routing with base_url (64f7f81)
  • clean up go browser routing follow-ups (77bda33)
  • keep browser pool routing in sync with cache (4f754d1)
  • make browser route deletion win over sniffing (0e44ff3)
  • propagate browser HTTP client config errors (1ec1358)
  • remove old go browser scope package (d594f39)
  • tighten browser route metadata parsing (b293866)
  • tighten browser-scoped helper surface (3e3e33f)

Chores

  • internal: more robust bootstrap script (c0430e3)

Documentation

  • add browser-scoped raw http example (92dc96e)

Refactors

  • move browser route cache sync into middleware (62078d3)
  • move go browser routing rollout to env (681e57f)
  • narrow browser-scoped helper exports (0ac61ef)
  • remove browser session wrapper layer (3452e53)
  • rename browser routing subresources config (909c377)
  • simplify direct-to-vm route caching (6bdf25f)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions


Note

Medium Risk
Adds new browser direct-to-VM routing middleware and a browser-scoped http.Client, which changes how certain /browsers/{id}/... requests are rewritten and authenticated; mistakes could break browser subresource calls or route caching/eviction.

Overview
Bumps the SDK version to 0.51.0 (manifest, internal/version.go, README pin, changelog, and OpenAPI spec metadata).

Adds browser-scoped routing support: a new lib/browserrouting package with a route cache, JWT extraction, /curl/raw tunneling RoundTripper, and a middleware that rewrites allowlisted /browsers/{session}/<subresource>/... requests to the browser VM using cached base_url/jwt, while warming/evicting cache entries based on successful browser and browser-pool responses.

Extends the public client surface by initializing and exposing Client.BrowserRouteCache, adding BrowserService.HTTPClient(sessionID) for raw browser-egress HTTP via /curl/raw, and adding browser_session_id to ManagedAuth responses; includes new unit + integration tests and an example for browser routing, plus a small bootstrap script robustness tweak (SKIP_BREW env handling).

Reviewed by Cursor Bugbot for commit 01bdd6a. Bugbot is set up for automated code reviews on this repo. Configure here.

rgarcia and others added 12 commits April 21, 2026 13:09
Bind browser subresource calls to a browser session's base_url and expose raw HTTP through a standard http.Client so metro-routed access feels like normal Go networking.

Made-with: Cursor
Use the browser session base_url directly for path rewriting, preserve custom HTTP clients in HTTPClient(), and add an env-gated integration test for browser-scoped routing.

Made-with: Cursor
Avoid depending on base_url path details in the integration test, keep the JWT helper package-private, and make round-tripper conformance explicit while preserving browser-scoped routing behavior.

Made-with: Cursor
Keep the raw round-tripper constructor package-private, remove defensive middleware branches that imply unsupported empty inputs, and retain the browser-scoped integration coverage without baking in base_url path details.

Made-with: Cursor
Replace the handwritten browser-scoped Go service façade with deterministic generated bindings derived from the generated browser service graph, and enforce regeneration in lint.

Made-with: Cursor
Show the browser-scoped HTTPClient flow explicitly so the /curl/raw-backed public API is discoverable from a runnable Go example.

Made-with: Cursor
Route browser subresources and raw HTTP through the shared browser route cache so the SDK no longer needs the generated browser-scoped client surface.

Made-with: Cursor
Drop the extra cache priming helper, remove metro wording, and rename the example so the go diff stays focused on direct-to-VM routing.

Made-with: Cursor
Rename the browser routing allowlist field to Subresources so the direct-to-VM configuration is shorter and easier to read.

Made-with: Cursor
Rename the handwritten routing helpers to browserrouting, fix the shared-cache and RawPath issues, and revert the generated/module churn that should not stay in the PR.

Made-with: Cursor
Drop the superseded lib/browserscope files now that the renamed browserrouting package owns the direct-to-VM helpers.

Made-with: Cursor
@firetiger-agent
Copy link
Copy Markdown

Firetiger deploy monitoring skipped

This PR didn't match the auto-monitor filter configured on your GitHub connection:

Any PR that changes the kernel API. Monitor changes to API endpoints (packages/api/cmd/api/) and Temporal workflows (packages/api/lib/temporal) in the kernel repo

Reason: This is an automated release PR for a Go SDK with only internal bootstrap script changes, not a kernel API or Temporal workflow modification.

To monitor this PR anyway, reply with @firetiger monitor this.

@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app Bot commented Apr 23, 2026

🧪 Testing

To try out this version of the SDK:

Download and unzip: 'https://pkg.stainless.com/s/kernel-go/a13c8f6fddde9206ea4ab09a52fef508b167e8c8/source.zip'. Run 'go mod edit -replace github.com/kernel/kernel-go-sdk=/path/to/unzipped_directory'.

Expires at: Sun, 24 May 2026 21:16:16 GMT
Updated at: Fri, 24 Apr 2026 21:16:16 GMT

rgarcia and others added 3 commits April 24, 2026 11:08
Stop exposing browser routing rollout controls on the client constructor and derive direct-to-VM subresource routing from KERNEL_BROWSER_ROUTING_SUBRESOURCES instead, defaulting to curl while keeping raw HTTP helpers cache-backed.
Return request config errors from Browsers.HTTPClient instead of silently falling back to the default client, so invalid options do not drop custom HTTP behavior without notice. Add a regression test for the failure path.

Made-with: Cursor
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 696014d to 391bb8d Compare April 24, 2026 17:57
@stainless-app stainless-app Bot changed the title release: 0.50.1 release: 0.51.0 Apr 24, 2026
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 391bb8d to 9abcc23 Compare April 24, 2026 17:57
rgarcia and others added 6 commits April 24, 2026 15:58
Centralize browser route cache warm-up and eviction in the shared routing middleware so browser service methods can stay generic while direct-to-VM routing still learns browser base URLs from API responses.

Made-with: Cursor
Reject subresource paths when detecting browser metadata responses and unify the post-response cache sync path so routing middleware does not carry dead duplicate logic.

Made-with: Cursor
Process cache sniffing before successful browser delete eviction so delete responses that include browser metadata cannot reinsert stale route entries. Add a regression test for JSON delete responses.

Made-with: Cursor
Warm the direct VM route cache from browser pool acquire responses and evict released sessions by sniffing the pool release request body in middleware.

Made-with: Cursor
feat: add direct-to-vm browser routing
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 9abcc23 to 01bdd6a Compare April 24, 2026 21:15
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 01bdd6a. Configure here.


func isJSONResponse(header http.Header) bool {
mediaType, _, _ := mime.ParseMediaType(header.Get("Content-Type"))
return strings.Contains(mediaType, "application/json") || strings.HasSuffix(mediaType, "+json")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overly broad JSON content-type matching via Contains

Low Severity

isJSONResponse uses strings.Contains(mediaType, "application/json") instead of equality. This matches non-JSON media types like application/jsonl (JSON Lines) or application/json-seq whose bodies aren't valid single JSON values. While the json.Unmarshal failure is handled gracefully (returns nil, body restored), mediaType == "application/json" would be more precise — the HasSuffix("+json") check already covers structured JSON subtypes like application/vnd.api+json.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 01bdd6a. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant